{% extends "base.html" %}

{% block body %}
    {% if error.is_private %}
        <p><i>{{ _('This contest is private to specific users.') }}</i></p>
    {% endif %}

    {% if error.is_organization_private %}
        {% if error.orgs %}
            {% if error.is_private %}
                <p>{{ _('Additionally, only the following organizations may access this contest:') }}</p>
            {% else %}
                <p>{{ _('Only the following organizations may access this contest:') }}</p>
            {% endif %}
            <ul>
                {% for org in error.orgs %}
                    <li><a href="{{ org.get_absolute_url() }}">{{ org.name }}</a></li>
                {% endfor %}
            </ul>
        {% endif %}

        {% if error.classes %}
            {% if not error.orgs and error.is_private %}
                <p>{{ _('Additionally, only the following classes may access this contest:') }}</p>
            {% elif not error.orgs %}
                <p>{{ _('Only the following classes may access this contest:') }}</p>
            {% else %}
                <p>{{ _('Alternatively, the following classes may access this contest:') }}</p>
            {% endif %}
            <ul>
                {% for class in error.classes %}
                    <li><a href="{{ class.get_absolute_url() }}">{{ class.name }}</a></li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endif %}
{% endblock %}
